#ifndef __RECTLAYOUT_H__
#define __RECTLAYOUT_H__

#include "GameGlobal.h"

class RectLayout
{
public:
	static void AlignToTopLeft(CCSprite* pSprite);
	static void AlignToTopRight(CCSprite* pSprite);
	static void AlignToBottomLeft(CCSprite* pSprite);
	static void AlignToBottomRight(CCSprite* pSprite);

	static void AlignToLeft(CCSprite* pSprite);
	static void AlignToRight(CCSprite* pSprite);
	static void AlignToTop(CCSprite* pSprite);
	static void AlignToBottom(CCSprite* pSprite);

	static void AlignToCenter(CCSprite* pSprite);

	static CCPoint TopLeft(){
		return CCPoint::CCPoint(0,1);
	};

	static CCPoint TopRight(){
		return CCPoint::CCPoint(1,1);
	};

	static CCPoint BottomLeft(){
		return CCPoint::CCPoint(0,0);
	};

	static CCPoint BottomRight(){
		return CCPoint::CCPoint(1,0);
	};

	static CCPoint Top(){
		return CCPoint::CCPoint(1,0.5);
	};

	static CCPoint Right(){
		return CCPoint::CCPoint(1,0.5);
	};

	static CCPoint Bottom(){
		return CCPoint::CCPoint(0.5,0);
	};

	static CCPoint Left(){
		return CCPoint::CCPoint(0.5,0);
	};

	static CCPoint Center(){
		return CCPoint::CCPoint(0.5,0.5);
	};
};

#endif